<h1>Listing donations</h1>

<table>
  <thead>
    <tr>
      <th>User</th>
      <th>Campaign</th>
      <th>Amount</th>
      <th>Proxy user</th>
      <th>Note</th>
      <th>Anonymous</th>
      <th></th>
      <th></th>
      <th></th>
    </tr>
  </thead>

  <tbody>
    <% @donations.each do |donation| %>
      <tr>
        <td><%= donation.user_id %></td>
        <td><%= donation.campaign_id %></td>
        <td><%= donation.amount %></td>
        <td><%= donation.proxy_user_id %></td>
        <td><%= donation.note %></td>
        <td><%= donation.anonymous %></td>
        <td><%= link_to 'Show', donation %></td>
        <td><%= link_to 'Edit', edit_donation_path(donation) %></td>
        <td><%= link_to 'Destroy', donation, method: :delete, data: { confirm: 'Are you sure?' } %></td>
      </tr>
    <% end %>
  </tbody>
</table>

<br>

<%= link_to 'New Donation', new_donation_path %>
